package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    /**
     * 新增套餐
     * @param list
     */
    void insertbatch(List<SetmealDish> list);


    /**
     * 根据菜品id查询对应的套餐id
     * @param dishids
     * @return
     */
    List<Long> getsetmealdishid(List<Long> dishids);

    /**
     * 删除套餐关联菜品
     * @param id
     */
    @Delete("delete from sky_take_out.setmeal_dish where setmeal_id=#{id}")
    void deletesetmealId(Long id);

    void deletesetmealDishIds(List<Long> ids);
}
